﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EventMgrLib;

namespace SmartMotion.Core
{
    /// <summary>
    /// 全局事件，启动停止，暂停继续，初始化，复位
    /// </summary>
    public class GlobalControlEvent : PubSubEvent<Controller> { }
    /// <summary>
    /// 全局控制    
    /// </summary>  
    public enum Controller
    {
        none,
        /// <summary>   
        /// 初始化
        /// </summary>
        Initialize,
        /// <summary>
        /// 复位
        /// </summary>
        Home,
        /// <summary>
        /// 启动
        /// </summary>
        Start,
        /// <summary>
        /// 暂停
        /// </summary>
        Pause,
        /// <summary>
        /// 继续
        /// </summary>
        Continue,
        /// <summary>
        /// 停止
        /// </summary>
        Stop,
        /// <summary>
        /// 运行一行
        /// </summary>
        RunRow,
        /// <summary>
        /// 运行选中流程
        /// </summary>
        RunFlow
    }

    //产品管理相关事件,创建，打开，保存，另存，添加变量，删除变量，编辑变量
    public class ProductEvent : PubSubEvent<FileOpt> { }

    public enum FileOpt
    {
        None,
        Create,
        Open,
        Save,
        SaveAs,
        Add,
        Del,
        Edit,
    }

    public class FlowEvent : PubSubEvent<FileOpt> { }


    public class ExitApp : PubSubEvent { }
    //打开IDE窗口
    public class ShowIdeWindow:PubSubEvent<string>{}

    public class RunStatusChanged:PubSubEvent<string>{}

    public class ShowEditFrm:PubSubEvent<Flow>{}

    public class SelectActionChanged:PubSubEvent<ActionItem>{}
    public class SelectFlowChanged : PubSubEvent<Flow> { }

    public class DebugMessage:PubSubEvent<string>{}
        
    public class PropertyValueChanged:PubSubEvent{}
}
